package com.zjy.software.day11;

public class RuntimeExceptionTest {
    public static void main(String[] args) {
        testRuntimeException(150);

    }

    private static void testRuntimeException(int age) {
        if(age >120 || age <0){
            throw new MyRuntimeException("传入的年龄有误");
        }
    }

}
